// components/passWord/passWord.js
Component({
    /**
   * 组件的属性列表
   */
    properties: {
        codeNum: {
            type: Number,
            observer(newVal, oldVal, changePath) {
                this.setData({
                    codeNum: newVal
                });
            }
        },
        styleClass: {
            type: Number,
            observer(newVal, oldVal, changePath) {
                this.setData({
                    styleClass: newVal
                });
            }
        }
    },
    /**
   * 组件的初始数据
   */
    data: {
        focus: false,
        Length: 6,
        //输入框个数  
        isFocus: true,
        //聚焦  
        Value: "",
        //输入的内容  
        ispassword: false
    },
    /**
   * 组件的方法列表
   */
    methods: {
        password_input: function(e) {
            var that = this;
            var inputValue = e.detail.value;
            that.setData({
                Value: inputValue
            });
            this.triggerEvent("passwordNum", inputValue);
        },
        Tap() {
            var that = this;
            that.setData({
                isFocus: true
            });
        },
        getFocus: function() {
            this.setData({
                focus: !this.data.focus
            });
        }
    }
});